/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.easyidea.its.domain.model.system;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.easyidea.its.domain.model.BaseEntity;

/**
 * 
 * @author hukn
 */
@Entity
@Table(name = "PermissionAction")
public class PermissionAction extends BaseEntity {
	private static final long serialVersionUID = 1L;
	private String actionName;
	private String packageName;
	private Permission permission;

	public PermissionAction() {
	}


	public PermissionAction(Integer id, boolean isDeleted) {
		this.setId(id);
		this.setDeleted(isDeleted);
	}

	@Column(name = "action_name", length = 255)
	public String getActionName() {
		return actionName;
	}

	public void setActionName(String actionName) {
		this.actionName = actionName;
	}

	@Column(name = "package_name", length = 255)
	public String getPackageName() {
		return packageName;
	}

	public void setPackageName(String packageName) {
		this.packageName = packageName;
	}
	@ManyToOne
	@JoinColumn(name = "permission_id", nullable = false)
	public Permission getPermission() {
		return permission;
	}

	public void setPermission(Permission permission) {
		this.permission = permission;
	}
}
